class debug =
    object(this)

    method read_process program =
     let _readMe, _outMe = Unix.pipe () in
    ignore(Unix.create_process program [| program |] (* program [| program; arg1; arg2 |] *)
    Unix.stdin _outMe _outMe);
    Unix.close _outMe;
    let in_channel = Unix.in_channel_of_descr _readMe in
    let lines = ref [] in
    begin
        try
        while true do
            lines := input_line in_channel :: !lines
        done
        with End_of_file -> ()
    end;
    Unix.close _readMe

    method reload program =
        let () = Unix.execv "/bin/sh" [| "/bin/sh"; "-c"; program |] in ()

end
